package lab01;

/**
 * Created by lenovo on 2017/9/30.
 */

import java.util.Scanner;

public class Test11 {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个数");
        int dividend = sc.nextInt();
        int num;
        int divider;
        int i = 0;
        outer:
        for (num = 2; num <= dividend; num++) {
            for (divider = 2; divider < num / 2; divider++) {
                if (num % divider == 0) {
                    continue outer;
                }
            }
            System.out.print(num+"\t");
            i++;
            if (i % 5 == 0) {
                System.out.println();
            }
        }
    }
}
